Skip to content

rbac: apply the shadow_rules_stat_prefix to shadow stats in addition to dynamic metadata#15391

Merged
mattklein123 merged 2 commits intoenvoyproxy:mainfrom
yangminzhu:rbac
Mar 12, 2021
Merged

rbac: apply the shadow_rules_stat_prefix to shadow stats in addition to dynamic metadata#15391
mattklein123 merged 2 commits intoenvoyproxy:mainfrom
yangminzhu:rbac

Conversation

@yangminzhu
Copy link
Contributor

In my original PR (#15323), I intended to only apply the prefix to the dynamic metadata key emitted by the shadow_rules. However, looking at the current API description, the normal understanding is it should also apply to the normal shadow_allowed and shadow_denied stats. This PR adds the support for this.

We could add another field shadow_rules_dynamic_metadata_prefix in the API to allow configuring these separately but I'm not sure if people would ever need a different prefix for the same shadow rules. I can add it if it makes sense to anyone.

cc @mattklein123 who reviewed the last PR.

Commit Message: Apply the shadow_rules_stat_prefix to shadow stats in addition to dynamic metadata.
Additional Description: N/A
Risk Level: Low
Testing: Unit Tests
Docs Changes: Updated the RBAC filter documentation
Release Notes: N/A
Platform Specific Features: N/A

…to dynamic metadata

Signed-off-by: Yangmin Zhu <ymzhu@google.com>
@mattklein123 mattklein123 self-assigned this Mar 10, 2021
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks this makes sense to me with small comment.

/wait


The RBAC network filter outputs statistics in the *<stat_prefix>.rbac.* namespace.

For the shadow rule statistics `shadow_allowed` and `shadow_denied`, the :ref:`shadow_rules_stat_prefix <envoy_v3_api_field_extensions.filters.http.rbac.v3.RBAC.shadow_rules_stat_prefix>`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy/paste issue here for the field? Should point to network filter? Same below?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thanks for catching. Updated both.

Signed-off-by: Yangmin Zhu <ymzhu@google.com>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mattklein123 mattklein123 merged commit d28f2f6 into envoyproxy:main Mar 12, 2021
aunu53 pushed a commit to aunu53/envoy that referenced this pull request Mar 19, 2021
…to dynamic metadata (envoyproxy#15391)

Signed-off-by: Yangmin Zhu <ymzhu@google.com>
Signed-off-by: Auni Ahsan <auni@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants